package com.jiayang.hhotel.ui;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.jiayang.hhotel.R;

import cn.droidlover.xdroidmvp.mvp.XActivity;

/**
 * Created by zj on 2017/5/11 0011.
 * 设置——酒店——政策宣传设置
 */

public class PolicySetActivity extends XActivity {
    private LinearLayout ll_gallay;
    @Override
    public void initData(Bundle savedInstanceState) {
        initView();
    }

    private void initView(){
        ll_gallay=(LinearLayout)findViewById(R.id.id_gallery);
        String[] texts=new String[]{"酒店文化","涉外政策","住店须知","近期优惠","本店特色","服务设施","营业项目"};
        Integer[] imgs=new Integer[]{R.mipmap.hotel_culture,R.mipmap.foreign_policy,R.mipmap.room_role,R.mipmap.favourable,R.mipmap.feature,R.mipmap.installation,R.mipmap.hotel_item};

        for(int i=0;i<7;i++){
            View itemview = getLayoutInflater().inflate(R.layout.index_gallery_item,
                    ll_gallay, false);
            ImageView img = (ImageView) itemview
                    .findViewById(R.id.id_index_gallery_item_image);
            img.setImageResource(imgs[i]);
            TextView txt = (TextView) itemview
                    .findViewById(R.id.id_index_gallery_item_text);
            txt.setText(texts[i]);
            //itemview.seti
            ll_gallay.addView(itemview);

        }
    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_policy_set;
    }

    @Override
    public Object newP() {
        return null;
    }
}
